class MyArray<T>{
    public Object[] arrary=new Object[10];

    public void setArrary(int pos,T x){
        arrary[pos]=x;
    }
    public T  getval(int pos){
        return (T)arrary[pos];
    }
}
public class Text_3_30 {
    public static void main(String[] args) {
    MyArray<Integer> myArray=new MyArray<Integer>();
        myArray.setArrary(0,1);
        myArray.setArrary(1,2);
    }
    public static void main1(String[] args) {
        MyArray myArray=new MyArray();
        myArray.setArrary(0,10);
        myArray.setArrary(1,8);
        myArray.setArrary(2,"Hello");

        String s=(String) myArray.getval(2);
        System.out.println(s);
    }
}
